
<h4>文章列表</h4>
<form nz-form class="">
  <div nz-row [nzGutter]="40" class="mgb20">
    <div nz-col [nzSpan]="6">
      <input nz-input placeholder="文章名称" [(ngModel)]="value.title.val" name="value.title.val"/>
    </div>
    <div nz-col [nzSpan]="6">
      <input nz-input placeholder="文章摘要" [(ngModel)]="value.abstract.val" name="value.abstract.val"/>
    </div>
  </div>

  <div nz-row>
      <div nz-col [nzSpan]="24" class="right-btns">
          <button nz-button [routerLink]="['/article/add']"><i class="anticon anticon-plus"></i><span>添加</span></button>
          <button nz-button (click)="clear()">清空</button>
          <button nz-button [nzType]="'primary'" (click)="query()">查询</button>
      </div>
  </div>
</form>



<nz-table #nzTable
  [nzData]="dataSet"
  [nzFrontPagination]="false"
  [nzShowSizeChanger]="false"
  [nzLoading]="_loading"
  [nzTotal]="total"
  [(nzPageIndex)]="current_page"
  (nzPageIndexChange)="query()"
  [(nzPageSize)]="per_page"
  (nzPageSizeChange)="query()">
  <thead nz-thead>
    <tr>
      <th nz-th><span>文章名称</span></th>
      <th nz-th><span>图片</span></th>
      <th nz-th style="width:300px;"><span>摘要</span></th>
      <th nz-th><span>浏览数</span></th>
      <th nz-th><span>原创</span></th>
      <th nz-th><span>创建时间</span></th>
      <th nz-th><span>操作</span></th>
    </tr>
  </thead>
  <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of nzTable.data">
      <td nz-td><div style="overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;" title="{{data.title}}">{{data.title}}</div>
      </td>
      <td nz-td><img class="bank-logo" src="{{getPics(data.pics)}}" alt=""></td>
      <td nz-td><div style="overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;" title="{{data.abstract}}">{{data.abstract}}</div>
      </td>
      <td nz-td>{{data.view_count}}</td>
      <td nz-td>{{data.is_original?'是':'否'}}</td>
      <td nz-td>{{data.created_at}}</td>
      <td nz-td>
          <a href="#" [routerLink]="['/article/edit', data.id]">编辑</a>
          <a href="javascript:;" (click)="delArticle(data.id)">删除</a>
      </td>
    </tr>
  </tbody>
</nz-table>
